x86: make page table handling error paths preemptible
authorJan Beulich <jbeulich@suse.com>
Thu, 2 May 2013 14:39:37 +0000 (16:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 May 2013 14:39:37 +0000 (16:39 +0200)
commitb8efae696c9a2d46e91fa0eda739427efc16c250
treebf25df252ae9e292a630d8497327ddd3c6070808
parenta3e049f8e86fe18e3b87f18dc0c7be665026fd9f
x86: make page table handling error paths preemptible

... as they may take significant amounts of time.

This requires cloning the tweaked continuation logic from
do_mmuext_op() to do_mmu_update().

Note that in mod_l[34]_entry() a negative "preemptible" value gets
passed to put_page_from_l[34]e() now, telling the callee to store the
respective page in current->arch.old_guest_table (for a hypercall
continuation to pick up), rather than carrying out the put right away.
This is going to be made a little more explicit by a subsequent cleanup
patch.

This is part of CVE-2013-1918 / XSA-45.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm.c